home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 678 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: mj-perry@students.uiuc.edu (Perry Michael James)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: delete or delete[] ???
  5. Date: 10 Mar 1996 16:32:52 PST
  6. Organization: University of Illinois at Urbana
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4hqnnu$ph6@vixen.cso.uiuc.edu>
  9. References: <4hnqvf$mgr@fsgi01.fnal.gov>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. Keywords: delete
  12. X-Original-Date: 9 Mar 1996 01:43:26 GMT
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMUN00Ey4NqrwXLNJAQEppAH9FRBsygYosbFkkXF0XTrqHQnuyiOIFwYd
  15.     UPfWNek0RJulZqfGUgO+K0GNiB/Ww1tBP3JZGLLzwpTLtlG5zCCNxQ==
  16.     =97Ru
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. b91926@fsgi01.fnal.gov (David Sachs) writes:
  20.  
  21. >Should delete or delete[] be used for a pointer to an array type?
  22.  
  23. >// It is assumed that some_type is an existing type
  24. >typedef some_type array_type[10];
  25.  
  26. You need to use delete [] variable when the variable type is an array of
  27. any kind.  
  28.  
  29.  
  30. --
  31. //     "C makes it easy to shoot yourself in the foot.  C++ makes it
  32. //      harder, but when you do, it blows away your whole leg."
  33. //             
  34. //                                       -- Bjarne Stroustrup on C++ 
  35. ---
  36. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  37.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  38.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  39.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  40.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  41. ]
  42.